package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusinessAccessRuleMapper;
import com.ruoyi.business.domain.BusinessAccessRule;
import com.ruoyi.business.service.IBusinessAccessRuleService;

/**
 * 准入规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-31
 */
@Service
public class BusinessAccessRuleServiceImpl implements IBusinessAccessRuleService 
{
    @Autowired
    private BusinessAccessRuleMapper businessAccessRuleMapper;

    /**
     * 查询准入规则
     * 
     * @param id 准入规则主键
     * @return 准入规则
     */
    @Override
    public BusinessAccessRule selectBusinessAccessRuleById(Long id)
    {
        return businessAccessRuleMapper.selectBusinessAccessRuleById(id);
    }

    /**
     * 查询准入规则列表
     * 
     * @param businessAccessRule 准入规则
     * @return 准入规则
     */
    @Override
    public List<BusinessAccessRule> selectBusinessAccessRuleList(BusinessAccessRule businessAccessRule)
    {
        return businessAccessRuleMapper.selectBusinessAccessRuleList(businessAccessRule);
    }

    /**
     * 新增准入规则
     * 
     * @param businessAccessRule 准入规则
     * @return 结果
     */
    @Override
    public int insertBusinessAccessRule(BusinessAccessRule businessAccessRule)
    {
        return businessAccessRuleMapper.insertBusinessAccessRule(businessAccessRule);
    }

    /**
     * 修改准入规则
     * 
     * @param businessAccessRule 准入规则
     * @return 结果
     */
    @Override
    public int updateBusinessAccessRule(BusinessAccessRule businessAccessRule)
    {
        return businessAccessRuleMapper.updateBusinessAccessRule(businessAccessRule);
    }

    /**
     * 批量删除准入规则
     * 
     * @param ids 需要删除的准入规则主键
     * @return 结果
     */
    @Override
    public int deleteBusinessAccessRuleByIds(Long[] ids)
    {
        return businessAccessRuleMapper.deleteBusinessAccessRuleByIds(ids);
    }

    /**
     * 删除准入规则信息
     * 
     * @param id 准入规则主键
     * @return 结果
     */
    @Override
    public int deleteBusinessAccessRuleById(Long id)
    {
        return businessAccessRuleMapper.deleteBusinessAccessRuleById(id);
    }
}
